<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title></title>
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  <meta http-equiv="cleartype" content="on">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="">
  <meta name="format-detection" content="telephone=no">
  <meta name="format-detection" content="email=no">

  <script src="../../../js/reactlocal/react-with-addons.min-0.14.3.js" ></script>
  <script src="../../../js/reactlocal/react-dom.min-0.14.3.js"  ></script>
  <script src="../../../js/reactlocal/ReactRouter.min-2.0.0.js" ></script>
  <script src="../../../js/reactlocal/fastclick.min-1.0.6.js" ></script>
  <script src="../../../js/reactlocal/lie.polyfill.min-3.0.2.js" ></script>
  <script src="../../../js/reactlocal/salt-router.min-0.0.2.js"  ></script>
  <!-- 钉钉 -->
  <script src="../../../js/reactlocal/dingtalk-ali-1.9.0.js" ></script>
  <!-- 微信 -->
  <script src="../../../js/reactlocal/jweixin-1.2.0.js" ></script>
  <script src="../../../../mobile/js/emp.js" ></script>
  <script src="../../../fmui/lib/jquery-3.1.0.min.js" ></script>
  <script src="../../../fmui/fonts-office/iconfont.js" ></script>
  <!--<script src="../../../fmui/lib/console.min.js"></script>-->
  <script type="text/javascript">
	document.write('<script src="../../../js/version.js?_='+Math.random()+'"><\/script>');
  </script>
  <script type="text/javascript">
	includeIndexCssFile(['./app.css?_v='+flexVersion,
	'../../../fmui/css/iconfont-office.min.css?_v='+flexVersion,
	'../../../fmui/css/common.min.css?_v='+flexVersion
	]);
  </script>

</head>

<body>
  <!-- <iframe id="hidden_iframe" style="display:none;" scrolling="no" frameborder="0" name="hidden_iframe" src="../../../mobile/jsp/refresh.jsp"></iframe> -->
  <!-- Nowa Server 注入位置 -->
  <!-- nowa server injects -->
  <input type="hidden" id="context" />
  <input type="hidden" id="token" value="" />
  <input type="hidden" id="baseContext" value="" />
  <input type="hidden" id="hasBottomTab" value="">
  <input type="hidden" id="userHiddenId" value="" />
  <input type="hidden" id="userHiddenDDId" value="">
  <input type="hidden" id="orgHiddenId" value="" />
  <input type="hidden" id="officeContext" value="">
  
  <script type="text/javascript">
	includeIndexJsFile([
	'../../../../mobile/js/emp.js?_v='+flexVersion,
	'../../../fmui/lib/base.js?_v='+flexVersion,
	'../../../js/userinfoutils.js?_v='+flexVersion
	]);
	var appJsUrl={url:'../dist/app.js?_v='+flexVersion,cache:true};
  </script>
  
  <div id="App"></div>
  <script>
    //设置搜索框字数长度
    function searchBarLimit(len) {
      $(".t-search-bar-input").attr('maxlength', len);
    }
    //避免报not defined错误
    var emp=window.emp;
	
	window.onload = initFun;
	
	function initFun(){
	  emp=window.emp;
      loginUserInfo = getLoginUserInfo();
	  if(loginUserInfo){
		  thirdUserCheck();
		  if (loginUserInfo.thirdMenuType == 'DING') {
			dd.ready(function () {
			  dd.ui.webViewBounce.disable();
			});
		  }
		  realCorpId = loginUserInfo.baseCorpId;
		  thirdMenuType = loginUserInfo.thirdMenuType;
		  setTitle = function (text) {
			switch (thirdMenuType) {
			  case 'DING': dd.biz.navigation.setTitle({
				title: text,
				onSuccess: function (result) { },
				onFail: function () { }
			  }); break;
			  case 'MH': !!emp&&emp.window.setTitle({
				title: {
				  text: text,
				  icon: '',
				  actionmenu: {}
				}
			  }); break;
			  case 'COCALL': $("title").text(text); break;
			  case 'WLK':$("title").text(text);break;
			  case 'WX':$("title").text(text);break;
			}
		  }
		  $("#userHiddenId").val(loginUserInfo.thirdUserId);
		  $("#userHiddenDDId").val(loginUserInfo.userId);
		  $("#userHiddenName").val(loginUserInfo.userName);
		  $("#orgHiddenId").val(loginUserInfo.orgId);
		  $("#orgHiddenName").val(loginUserInfo.orgName);
		  $("#token").val(loginUserInfo.token);
		  $("#baseContext").val(loginUserInfo.baseContext);
		  $("#officeContext").val(loginUserInfo.context);
		  $.getScript(appJsUrl, function (response, status) {
			clearLoading();
			if (status != 'success') {
			  alert('网络异常，js文件加载失败');
			}
		  }
		  );
		  jsready(function (result1) { });
	  }else{
		  setTimeout(initFun(), 200);
	  }
      
    }
  </script>

  <!-- 项目脚本资源加载 -->
  <!--<script src="./app.js" defer></script>-->
</body>

</html>